// 弹性布局
.flex(@justify-content: space-between, @align-items: stretch) {
  display: flex;
  justify-content: @justify-content;
  align-items: @align-items;
}

.flex_c() {
  flex-direction: column;
}

.flex_cr() {
  flex-direction: column-reverse;
}

.flex_rr() {
  flex-direction: row-reverse;
}

.col(@flex: 1) {
  flex: @flex;
}

// 盒子模型 设置
.box() {
  box-sizing: border-box;
}

//icon 设置
.background(@url: "") {
  background: url("@{url}") no-repeat;
  background-size: 100% 100%;
  display: inline-block;
}

//背景色
.bc(@color: white) {
  background-color: @color;
}

// placeholder 设置
.place(@placeholder-selector,
@placeholder-color) {
  .@{placeholder-selector} ::-webkit-input-placeholder {
    color: @placeholder-color;
  }
  .@{placeholder-selector} :-moz-placeholder {
    color: @placeholder-color;
  }
  .@{placeholder-selector} ::-moz-placeholder {
    color: @placeholder-color;
  }
  .@{placeholder-selector} :-ms-input-placeholder {
    color: @placeholder-color;
  }
}

// 文本不换行省略号
.nobr() {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

// 数字英文强制换行
.br() {
  white-space: normal;
  word-break: break-all;
}

//行高重置
.lh(@line-height: normal) {
  line-height: @line-height;
}

//文字间距
.lt(@letter-spacing: .02rem) {
  letter-spacing: @letter-spacing;
}

//圆角
.yj(@radius: .1rem) {
  border-radius: @radius;
}

.borderT(@selector) {
  .@{selector} {
    position: relative;

    &:after {
      content: "";
      position: absolute;
      left: 0;
      top: 0;
      width: 100%;
      height: 1px;
      /*no*/
      background-color: #dfdfdf;
      -webkit-transform: scaleY(0.5);
      transform: scaleY(0.5);
    }
  }
}

.borderB(@selector) {
  .@{selector} {
    position: relative;

    &:after {
      content: "";
      position: absolute;
      left: 0;
      bottom: 0;
      width: 100%;
      height: 1px;
      /*no*/
      background-color: #dfdfdf;
      -webkit-transform: scaleY(0.5);
      transform: scaleY(0.5);
    }
  }
}
.border(@selector) {
  .@{selector} {
    position: relative;

    &:after {
      content: "";
      position: absolute;
      left: 0;
      top: 0;
      width: 200%;
      height: 200%;
      border: 1px solid #dfdfdf;
      /*no*/
      transform-origin: 0 0;
      transform: scale(.5, .5);
    }
  }

}


